import requests
from lxml import etree


url = 'http://www.glidedsky.com/login'
payload = {
    '_token': "nrzEo8Pu4Xv275P1B8fAUQpwoOUeV9Yi0C7qiWBr",
    'email': '3112201774@qq.com',
    'password': 'hardtry..0706'
}

res_login = requests.post(url,data=payload)
# print(res_login.text)
url_detail ='http://www.glidedsky.com/level/web/crawler-basic-1'
headers = {
    "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "accept-encoding": "gzip, deflate",
    "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    "cache-control": "no-cache",
    "cookie": "Hm_lvt_020fbaad6104bcddd1db12d6b78812f6=1762170596; HMACCOUNT=DDE96B9C8A5564BC; _gid=GA1.2.779384710.1762170597; footprints=eyJpdiI6IkJcL2RYNmNPNjFGY1wvbTNkejNcL0luVHc9PSIsInZhbHVlIjoidERva2V0Wks4TDBkNWY2cGF1QjdcL0xoNnRmWmNrZGlnN2JaNWdYUG5aSHdseVFCTXBoYjZaWlh0SkIxZ2FrVWciLCJtYWMiOiJjMWE4MGRhNDJkOWY2MzI5MDBlOTAyZDFiMTRiYTE1NmNmNDExNTJmNjgyOTJiMjcxMTJkM2Q2ODgyMWQyNWVjIn0%3D; XSRF-TOKEN=eyJpdiI6InFtTzhFQ29hWVdRaWNEZ3ZDU05nNUE9PSIsInZhbHVlIjoiT3FuRFd0RUVNRVkwbXdUV3VYdmI3c2srMFdCYkwzOGY2RVFDSlgzcjM0bHVwcHVXT1lzQjJXTUhCXC91N1p3STYiLCJtYWMiOiIwOGVlYWM2NjhjZWJlNGIyYWQ3ZWNkODY2NGUyMmQyZWVjNzE0NjhlYmRhODI5OTQ3Y2FkNzAyNmYyZWMxN2QzIn0%3D; glidedsky_session=eyJpdiI6IkpnUmVvcFFYRzUwcWlqb1Z1SG5mSFE9PSIsInZhbHVlIjoiaU82VHZyY3ZJdG1RcGh6SEVCUENsTHRCVCtCd1RmOVhsWE9mYzRTK0s1TTlwWFJBRTVidUFtQk5HTEdOcmRwViIsIm1hYyI6IjVkNjRlYTI5NDAzYjg3OTM1ZTVlNDVlZDQ0NzAyMGI1YTc4Zjc4NjZjOTJhMDM4YmNkMzdiNjQ2Yzk3ZDFlYWUifQ%3D%3D; Hm_lpvt_020fbaad6104bcddd1db12d6b78812f6=1762170762; _ga=GA1.1.998305994.1762170597; _ga_YF6WY50PGC=GS2.1.s1762170596$o1$g1$t1762170762$j24$l0$h0",
    "host": "www.glidedsky.com",
    "pragma": "no-cache",
    "proxy-connection": "keep-alive",
    "referer": "http://www.glidedsky.com/level/crawler-basic-1",
    "upgrade-insecure-requests": "1",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0"
}
res_detail = requests.get(url_detail,headers=headers)
# print(res_detail.text)
tree = etree.HTML(res_detail.text)
items = tree.xpath('//div[@class="card"]/div[@class="card-body"]/div[@class="row"]/div[@class="col-md-1"]')
total = 0
for item in items:
    num = int(item.text.strip())
    print(num)
    total += num

print(total)